import { axios } from '@/utils/request'
// const baseUrl = 'https://xsxz-dev.shouhuobao.com/';
const api = {
  postType: 'https://xsxz-dev.shouhuobao.com/communityPosition/list',
  workExp: 'https://xsxz-dev.shouhuobao.com/communityPosition/workExperienceList',
  education: 'https://xsxz-dev.shouhuobao.com/communityPosition/educationList',
  salary: 'https://xsxz-dev.shouhuobao.com/communityPosition/salaryList',
  jobCity: 'https://xsxz-dev.shouhuobao.com/dynamic/provinceCityList',
  publishJob: 'https://xsxz-dev.shouhuobao.com/dynamic/submit',
  jobList: 'https://xsxz-dev.shouhuobao.com/web/dynamic/list',
  shelves: 'https://xsxz-dev.shouhuobao.com/web/dynamic/invalid',
  details: 'https://xsxz-dev.shouhuobao.com//dynamic/showById',
  qrCodeUrl: 'https://xsxz-dev.shouhuobao.com/rank/codeLimit',
  reportList: 'https://xsxz-dev.shouhuobao.com/web/join/list',
  changeStatus: 'https://xsxz-dev.shouhuobao.com/web/join/changeStatus',
  reportDetail: 'https://xsxz-dev.shouhuobao.com/web/join/detail'
}

export default api
// 职位列表
export function getJobList (parameter) {
  return axios({
    url: api.jobList,
    method: 'get',
    params: parameter
  })
}
// 职位类型
export function getPostTypeList (parameter) {
  return axios({
    url: api.postType,
    method: 'get',
    params: parameter
  })
}
// 工作经验
export function getWorkExpList (parameter) {
  return axios({
    url: api.workExp,
    method: 'get',
    params: parameter
  })
}
// 学历要求
export function getEducationList (parameter) {
  return axios({
    url: api.education,
    method: 'get',
    params: parameter
  })
}
// 薪资范围
export function getSalaryList (parameter) {
  return axios({
    url: api.salary,
    method: 'get',
    params: parameter
  })
}
// 工作城市
export function getJobCityList (parameter) {
  return axios({
    url: api.jobCity,
    method: 'get',
    params: parameter
  })
}

// 发布职位
export function publishJob (parameter) {
  return axios({
    url: api.publishJob,
    method: 'post',
    params: parameter
  })
}

// 下架职位
export function shelvesJob (parameter) {
  return axios({
    url: api.shelves,
    method: 'post',
    params: parameter
  })
}

// 职位详情
export function details (parameter) {
  return axios({
    url: api.details,
    method: 'get',
    params: parameter
  })
}

// 详情二维码
export function qrCodeUrl (parameter) {
  return axios({
    url: api.qrCodeUrl,
    method: 'get',
    params: parameter
  })
}

// 报名列表
export function getReportList (parameter) {
  return axios({
    url: api.reportList,
    method: 'get',
    params: parameter
  })
}
// 改变状态
export function changeStatus (parameter) {
  return axios({
    url: api.changeStatus,
    method: 'get',
    params: parameter
  })
}

// 报名详情
export function reportDetail (parameter) {
  return axios({
    url: api.reportDetail,
    method: 'get',
    params: parameter
  })
}
